﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL_V1.App_Code.DBBroker;
using EntityObjects;
using System.Web;


namespace BAL.Controller
{
    public class LoginControl
    {
        EmployeeDBBroker empRef;
        public LoginControl()
        {
            empRef = EmployeeDBBroker.getEmployeeDBBroker();
        }

        public Employee VerifyUser(Employee emp)
        {
            Employee empRst = empRef.selectEmployee(emp.EmpId);
            if (empRst != null)
            {
                if (emp.Password == empRst.Password)
                    return empRst;
                else
                    return null;
            }
            else
                return null;
            
        }
    }
}
